<?php

/**
 * 
 *
 * @version $Id: show.inc.php,v 1.12 2005/01/06 17:54:18 phppc Exp $
 * @copyright 2004 
 **/
$page_nav = "";
$n_tpl["news"] = "";
if(!isset($_GET["page"])) $_GET["page"] = 1;
if(!isset($_GET["kat_id"])) $_GET["kat_id"] = 0;
list($anzahl_news_aktuell,$where_kat,$button_kat_id) = $this->fun_prepare_page_nav($this->where_time,$_GET["kat_id"]);
if ($anzahl_news_aktuell >= 1) {
    list ($start,$page_nav) = $this->fun_nav_page_creator($anzahl_news_aktuell,$this->db_config["news_per_page"],$_GET["page"],5,1,$button_kat_id,0,"page","");
	$erg = $this->db_abfrage_q ($this->main_abfrage . $this->where_time . $where_kat ." ORDER BY \"time_start\" DESC LIMIT $start,".$this->db_config["news_per_page"]."");
	$news_ids = array();
	while($db_n = $this->db_abfrage_fetch($erg)){
		$this->h_news_on[$db_n["news_id"]] = 1;
		$db_news[$db_n["news_id"]] = $db_n;
		array_push($news_ids,$db_n["news_id"]);
	} // while
	list($attr,$news_attr_ids) = $this->fun_get_attr_data($news_ids);
	foreach($news_ids as $news_id){
		$n_tpl["news"] .= $this->news_one($db_news[$news_id],"show");
	} // while
}else $this->message_red[] = 71;
$this->kat_rek(0,"input",$_GET["kat_id"],-1,1,"kat_id",1,"news_show_all_cats");
$input_kat = $this->kat_return_value();
$this->tpl_load("news_show");
$this->module_new_value["action"] = "show"; // Resetting of the action variable to show
$hidden_fields = $this->uf_create_hidden_form(array(""));
$this->tpl_replace_vars(array("input_kat" => $input_kat,"page_nav" => $page_nav,"main_news" => $n_tpl["news"],"hidden_fields" => $hidden_fields));
$nc_main = $this->tpl_output();

?>